#include<QGraphicsScene>
#include<QGraphicsView>
#include<QIcon>

#include <QApplication>
#include"Gamesetting.h"
#include"people.h"
int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    a.setApplicationDisplayName("飞机大战");
    //创建图标
    QApplication::setWindowIcon(QIcon(":/zhongli.png"));
    //创建people
    people* people=new class people;
    //创建场景
    QGraphicsScene* scene=new QGraphicsScene;
    scene->addItem(people);
    scene->setSceneRect(0,0,gamesetting::windowwidth,
                        gamesetting::windowheight);
    scene->setBackgroundBrush(QImage(":/bg.png"));
    QGraphicsView view(scene);
    view.setFixedSize(gamesetting::windowwidth,
                      gamesetting::windowheight);
    view.setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
    view.setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
    view.show();

    return a.exec();
}
